package com.example.demoaop.controller;

import com.example.demoaop.service.Human;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName HumanController
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2020/8/31 9:38 AM
 * @Version 1.0
 */
@RestController
@RequestMapping("/human")
public class HumanController {
	@Autowired
	private Human human;

	@GetMapping
	public void eat(@RequestParam("foodName")  String foodName) {
		human.eat(foodName);
	}
}
